#ifndef OBJECT_STRUCTURE_H
#define OBJECT_STRUCTURE_H
#include "element.h"
#include <list>
// 城市（西安）
class City
{
public:
    void Attach(IPlace *place) {
        m_places.push_back(place);
    }

    void Detach(IPlace *place) {
        m_places.remove(place);
    }

    void Accept(IVisitor *visitor) {
        for (auto place:m_places) {
            place->Accept(visitor);
        }
    }

private:
    std::list<IPlace *> m_places;
};

#endif // OBJECT_STRUCTURE_H
